package cn.tj.wenda.cloud.web.fallback;

import cn.tj.wenda.cloud.entity.ResponseBean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/fallback")
public class FallbackController {

    @RequestMapping("")
    public ResponseBean fallback(@RequestParam("name") String serviceName){
        ResponseBean res = new ResponseBean();
        res.setErr("1");
        res.setErrMsg("服务【" + serviceName + "】暂时不能访问，请稍候再试。");
        return res;
    }
}
